import request from '@/utils/request'

export default {
    //根据手机号码发送短信
    getMobile(mobile) {
        return request({
            url: `/api/sms/sendRandom/${mobile}`,
            method: 'get'
        })
    },
    //用户注册
    submitRegister(formItem) {
        return request({
            url: `/eduucenter/ucenterMember/registerUser`,
            method: 'post',
            data: formItem
        })
    },
    //登录
    submitLogin(userInfo) {
        return request({
            url: `/eduucenter/ucenterMember/login`,
            method: 'post',
            data: userInfo
        })
    },
    //根据token获取用户信息
    getLoginInfo() {
        return request({
            url: `/eduucenter/ucenterMember/getUserInfo`,
            method: 'get',
            // headers: {'token': cookie.get('guli_token')}
        })
        //headers: {'token': cookie.get('guli_token')}
    },

    //根据token获取用户信息
    logout() {
        return request({
            url: `/eduucenter/ucenterMember/logout`,
            method: 'get',
            // headers: {'token': cookie.get('guli_token')}
        })
        //headers: {'token': cookie.get('guli_token')}
    }
}